import request from '@/utils/request'

// 查询社会百态/新闻列表
export function listNew(query) {
  return request({
    url: '/mini/new/list',
    method: 'get',
    params: query
  })
}

// 查询社会百态/新闻详细
export function getNew(id) {
  return request({
    url: '/mini/new/' + id,
    method: 'get'
  })
}

// 新增社会百态/新闻
export function addNew(data) {
  return request({
    url: '/mini/new',
    method: 'post',
    data: data
  })
}

// 修改社会百态/新闻
export function updateNew(data) {
  return request({
    url: '/mini/new',
    method: 'put',
    data: data
  })
}

// 删除社会百态/新闻
export function delNew(id) {
  return request({
    url: '/mini/new/' + id,
    method: 'delete'
  })
}

// 逻辑删除 修改
export function changeNewDeleted(id,deleted){
  const data ={
    id,
    deleted
  }
  return request({
    url: '/mini/new/',
    method: 'put',
    data: data
  })
}
